package com.changgou.goods.controller.swaggerAPI;

import com.changgou.entity.Result;
import com.changgou.goods.pojo.Brand;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@Api(description = "基于品牌的增删改查实现",value = "品牌管理")
public interface BrandControllerApi {
    @ApiOperation("查询所有")
    Result findAll();

    @ApiOperation("根据Id查询")
    Result findById(@PathVariable Integer id);

    @ApiOperation("添加品牌")
    Result add(@RequestBody Brand brand);

    @ApiOperation("修改品牌")
    Result update(@RequestBody Brand brand,@PathVariable Integer id);

    @ApiOperation("删除品牌")
    Result delete(@PathVariable Integer id);

    @ApiOperation("条件查询")
    Result findList(@RequestParam Map searchMap);

    @ApiOperation("分页查询")
    Result findPage(@RequestParam Map searchMap, @PathVariable  int page, @PathVariable  int size);
    @ApiOperation("根据分类查询品牌")
    Result findBrandByCategory(@PathVariable("category") String category);
}
